<template>
  <div class="content">
    <!-- <n-image class="logo" height="65" :src="logo" /> -->
    <div class="dropdown">
      <AppHeaderDropdown />
    </div>
    <div class="search">
      <n-input v-model:value="search" @keydown.enter="handleKeyUp" type="text" placeholder="文章查询">
        <template #suffix>
          <n-icon>
            <Search />
          </n-icon>
        </template>
      </n-input>
    </div>
  </div>
</template>

<script setup lang="ts">
import { NImage, NInput, NIcon } from "naive-ui";
import { Search } from "@vicons/ionicons5";
const search = ref("");
const handleKeyUp = () => {
  navigateTo({
    path: "/search",
    query: {
      keyword: search.value,
    },
  });
};
</script>
<style lang="scss" scoped>
.content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;

  .logo {
    padding: 0 30px;
  }

  .dropdown {
    flex: 1;
    padding: 0 20px;
  }

  .search {
    padding: 0 30px;
  }
}
</style>
